package com.woniuxy.rbac.entity;

import lombok.*;

import java.io.Serializable;

/**
 * 统一响应
 *
 * @Auther: L
 */
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class ResponseResult<T> implements Serializable {
    private int code;       //响应码
    private String msg;     //描述
    private T data;         //数据

    public ResponseResult(T data) {
        this(200, "suc", data);
    }

    public ResponseResult(int code, String msg) {
        this(code, msg, null);
    }

    public static final ResponseResult SUCCESS = new ResponseResult(200, "suc");
    public static final ResponseResult FAIL = new ResponseResult(500, "fail");

}
